<template>
	<view :data-theme="theme">
		<!-- 普通消息详情 -->
		<view class="ensure" style="width: 100vw;height: 100vh;">
			<view style="font-size: 23px;text-align: center;margin: 20px 0;">{{msgDetailsItem.title}}</view>
			<view style="display: flex; flex-flow: row;justify-content: space-between;padding: 0px 30rpx">
				<view style="font-size: 26rpx;color: #999;" v-if="tabList[tabListIndex]">
					{{ tabList[tabListIndex].name }}
				</view>
				<view style="font-size: 26rpx;color: #999;">{{msgDetailsItem.createTime}}</view>
			</view>
			<view style="width: 100%;height: 1px;background-color: #e8eaed;margin: 20rpx 0;"></view>
			<view style="padding: 0px 30rpx 0px 40rpx">
				<view style="font-size: 30rpx;line-height: 50rpx;">{{msgDetailsItem.content}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		setThemeColor
	} from '../../../../utils/setTheme';
	let app = getApp();
	export default {
		data() {
			return {
				bgColor: "#ffffff",
				theme: app.globalData.theme,
				msgDetailsItem: {},
				tabListIndex: '',
				tabList: [{
						id: "tab1",
						name: "全部",
						type: "",
					},
					{
						id: "tab12",
						name: "违规通知",
						type: "0"
					},
					{
						id: "tab13",
						name: "业务通知",
						type: "1"
					},
					{
						id: "tab14",
						name: "系统功能",
						type: "2"
					},
					{
						id: "tab15",
						name: "学习培训",
						type: "3"
					},
					{
						id: "tab16",
						name: "奖励通知",
						type: "4"
					},
					{
						id: "tab17",
						name: "新商必读",
						type: "5"
					},

					{
						id: "tab19",
						name: "其他",
						type: "6"
					},
					{
						id: "tab18",
						name: "改建品咨询",
						type: "7"
					},
				],
			};
		},
		onLoad(props) {
			this.bgColor = setThemeColor()
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.bgColor,
			});
			let msgDetailsItem = JSON.parse(props.item);
			this.msgDetailsItem = msgDetailsItem;
			this.tabListIndex = this.msgDetailsItem.tabListIndex
		},
	}
</script>

<style lang="scss">

</style>